import request from "@/utils/request";

// 获得资格证书列表
export function getCertificateList(data) {
  return request({
    url: "/portal/personnel-certificate/page",
    method: "get",
    params:data,
  });
}

// 新增资格证书
export function createCertificate(data) {
  return request({
    url: "/portal/personnel-certificate/create",
    method: "post",
    data,
  });
}

// 修改资格证书
export function updateCertificate(data) {
  return request({
    url: "/portal/personnel-certificate/update",
    method: "post",
    data,
  });
}

// 资格证书详情
export function detailsCertificate(id) {
  return request({
    url: "portal/personnel-certificate/get?id=" + id,
    method: "get",
  });
}

// 删除资格证书
export function delCertificate(id) {
  return request({
    url: "portal/personnel-certificate/delete?id=" + id,
    method: "get",
  });
}

// 导出资格证书
export function exportCertificate(data) {
  return request({
    url: "portal/personnel-certificate/export-excel",
    method: "get",
    responseType: 'blob'
  });
}

// 导出资格证书
export function changeStatus(data) {
  return request({
    url: "portal/personnel-certificate/changeStatus",
    method: "post",
    data
  });
}